package Vista;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JButton;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class reporte1 extends javax.swing.JDialog {
	private JTextArea jTextArea1;
	private JLabel jLabel1;
	private JLabel jLabel2;
	private JLabel jLabel3;
	private JLabel jLabel4;
	private JLabel jLabel5;
	private JButton jButton1;
	private JLabel jLabel6;

	/**
	* Auto-generated main method to display this JDialog
	*/
	public static void main(String[] args) {
		SwingUtilities.invokeLater(new Runnable() {
			public void run() {
				JFrame frame = new JFrame();
				reporte1 inst = new reporte1(frame);
				inst.setVisible(true);
			}
		});
	}
	
	public reporte1(JFrame frame) {
		super(frame);
		initGUI();
	}
	
	private void initGUI() {
		try {
			{
				getContentPane().setLayout(null);
				this.addWindowListener(new WindowAdapter() {
					public void windowOpened(WindowEvent evt) {
						System.out.println("this.windowOpened, event="+evt);
						//TODO add your code for this.windowOpened
						Modelo.Reportes rep = new Modelo.Reportes();
						jTextArea1.setText(rep.getReporte1());
					}
				});
				{
					jTextArea1 = new JTextArea();
					getContentPane().add(jTextArea1);
					jTextArea1.setBounds(44, 98, 293, 195);
				}
				{
					jLabel1 = new JLabel();
					getContentPane().add(jLabel1);
					jLabel1.setText("Listado de Ventas por Cantidad");
					jLabel1.setBounds(31, 33, 273, 23);
					jLabel1.setFont(new java.awt.Font("Segoe UI",1,16));
				}
				{
					jLabel2 = new JLabel();
					getContentPane().add(jLabel2);
					jLabel2.setText("Monto");
					jLabel2.setBounds(259, 83, 35, 15);
					jLabel2.setFont(new java.awt.Font("Segoe UI",0,9));
				}
				{
					jLabel3 = new JLabel();
					getContentPane().add(jLabel3);
					jLabel3.setText("Cantidad");
					jLabel3.setBounds(192, 83, 47, 15);
					jLabel3.setFont(new java.awt.Font("Segoe UI",0,9));
				}
				{
					jLabel4 = new JLabel();
					getContentPane().add(jLabel4);
					jLabel4.setText("Producto");
					jLabel4.setBounds(123, 83, 47, 15);
					jLabel4.setFont(new java.awt.Font("Segoe UI",0,9));
				}
				{
					jLabel5 = new JLabel();
					getContentPane().add(jLabel5);
					jLabel5.setText("Cod Venta");
					jLabel5.setBounds(56, 83, 54, 15);
					jLabel5.setFont(new java.awt.Font("Segoe UI",0,9));
				}
				{
					jLabel6 = new JLabel();
					getContentPane().add(jLabel6);
					jLabel6.setText("(Ascendente)");
					jLabel6.setBounds(291, 37, 74, 15);
				}
				{
					jButton1 = new JButton();
					getContentPane().add(jButton1);
					jButton1.setText("Volver");
					jButton1.setBounds(265, 311, 72, 22);
					jButton1.addActionListener(new ActionListener() {
						public void actionPerformed(ActionEvent evt) {
							System.out.println("jButton1.actionPerformed, event="+evt);
							//TODO add your code for jButton1.actionPerformed
							dispose();
						}
					});
				}
			}
			this.setSize(400, 390);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
